package com.wing.product.controller.app;

import com.wing.common.utils.PageResult;
import com.wing.product.controller.admin.ProductDetailWMSController;
import com.wing.product.model.entity.Product;
import com.wing.product.model.entity.ProductCategory;
import com.wing.product.model.entity.ProductDetail;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@Validated
@Api(value = "App-enterprise服务无APP类接口管理", tags = "无APP类接口管理")
@RestController("appletController")
@RequestMapping("product/app/applet")
public class AppletController {

    @Autowired
    private ProductDetailWMSController productDetailWMSController;

    @ApiOperation(value = "查询所有产品明细表", notes = "搜索")
    @GetMapping("/getProductDetailWMS")
    public PageResult<ProductDetail> getProductDetailWMS(
            @RequestParam(defaultValue = "1") Integer page,
            @RequestParam(defaultValue = "10") Integer limit,
            @RequestParam(defaultValue = "create_time") String sort,
            @RequestParam(defaultValue = "asc") String order,
            String materialNature,
            String skuName,
            String skuCode,
            String skuSpec,
            String pricingMethod,
            String productCategoryId,
            String excludeId,
            Long warehouseId,
        String notInListIds,String inIds, String keyWord) {
        return productDetailWMSController.list(page, limit, sort, order, materialNature, null,
                skuName, skuCode,pricingMethod,skuSpec,excludeId,productCategoryId,notInListIds,inIds,warehouseId,keyWord);
    }
}
